import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'dart:io';
import 'config/theme_config.dart';
import 'config/route_config.dart';

void main() {
  runApp(const MyApp());
  
  if (Platform.isAndroid) {
    SystemUiOverlayStyle systemUiOverlayStyle = const SystemUiOverlayStyle(
      statusBarColor: Colors.transparent
    );
    SystemChrome.setSystemUIOverlayStyle(systemUiOverlayStyle);
  }
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeConfig.lightTheme,
      darkTheme: ThemeConfig.darkTheme,
      themeMode: ThemeMode.system,
      initialRoute: RouteConfig.home,
      routes: RouteConfig.routes,
      onGenerateRoute: RouteConfig.onGenerateRoute,
      onUnknownRoute: RouteConfig.onUnknownRoute,
    );
  }
}